import*as e from"../../../ui/components/helpers/helpers.js";import*as n from"../../../ui/lit-html/lit-html.js";import*as t from"../../../core/common/common.js";import*as o from"../../../core/i18n/i18n.js";import*as s from"../../../ui/components/icon_button/icon_button.js";import*as i from"../../../ui/legacy/legacy.js";const l=new CSSStyleSheet;l.replaceSync(".element-reveal-icon{--override-element-reveal-icon-background:rgb(110 110 110);display:inline-block;width:20px;height:20px;-webkit-mask-image:var(--image-file-select-element);background-color:var(--icon-default)}\n/*# sourceURL=./elementsPanelLink.css */\n");class a extends HTMLElement{static litTagName=n.literal`devtools-elements-panel-link`;#e=this.attachShadow({mode:"open"});#n=()=>{};#t=()=>{};#o=()=>{};set data(e){this.#n=e.onElementRevealIconClick,this.#t=e.onElementRevealIconMouseEnter,this.#o=e.onElementRevealIconMouseLeave,this.#s()}#s(){this.#i()}connectedCallback(){this.#e.adoptedStyleSheets=[l]}#i(){n.render(n.html` <span class="element-reveal-icon" @click="${this.#n}" @mouseenter="${this.#t}" @mouseleave="${this.#o}"></span> `,this.#e,{host:this})}}e.CustomElements.defineComponent("devtools-elements-panel-link",a);var c=Object.freeze({__proto__:null,ElementsPanelLink:a});const m=new CSSStyleSheet;m.replaceSync(".hide-issues-menu-btn{position:relative;display:flex;background-color:transparent;flex:none;align-items:center;justify-content:center;padding:0;margin:0 -2px 0 4px;overflow:hidden;border-radius:0;border:none;--icon-color:var(--icon-default)}.hide-issues-menu-btn:hover{--icon-color:var(--icon-default-hover)}\n/*# sourceURL=./hideIssuesMenu.css */\n");const r={tooltipTitle:"Hide issues"},d=o.i18n.registerUIStrings("panels/issues/components/HideIssuesMenu.ts",r),u=o.i18n.getLocalizedString.bind(void 0,d);class h extends HTMLElement{static litTagName=n.literal`devtools-hide-issues-menu`;#e=this.attachShadow({mode:"open"});#l=t.UIString.LocalizedEmptyString;#a=()=>{};set data(e){this.#l=e.menuItemLabel,this.#a=e.menuItemAction,this.#i()}connectedCallback(){this.#e.adoptedStyleSheets=[m]}onMenuOpen(e){e.stopPropagation();const n=new i.ContextMenu.ContextMenu(e,{useSoftMenu:!0,onSoftMenuClosed:()=>{this.classList.toggle("has-context-menu-opened",!1)}});n.headerSection().appendItem(this.#l,(()=>this.#a())),n.show(),this.classList.toggle("has-context-menu-opened",!0)}#i(){n.render(n.html` <button class="hide-issues-menu-btn" @click="${this.onMenuOpen.bind(this)}" title="${u(r.tooltipTitle)}"> <${s.Icon.Icon.litTagName} .data="${{color:"var(--icon-color)",iconName:"dots-vertical",height:"20px",width:"20px"}}"></${s.Icon.Icon.litTagName}> </button> `,this.#e,{host:this})}}e.CustomElements.defineComponent("devtools-hide-issues-menu",h);var p=Object.freeze({__proto__:null,HideIssuesMenu:h});export{c as ElementsPanelLink,p as HideIssuesMenu};
